package shared;

import java.io.Serializable;
import java.util.Hashtable;
import java.util.Vector;

public class Voto implements Serializable {
    
    private Hashtable<String,String> tabla;
    private Vector<String> aVotar; 
            
    public Voto(Vector<String> aVotar){
        tabla = new Hashtable<String,String>();
        this.aVotar = aVotar;
        for(String s:aVotar){
            tabla.put(s, "");
        }
    }
    
    public Vector<String> getCampos(){
        return aVotar;
    }
    
    public String get(String key){
        return tabla.get(key);
    }

    public void put(String key, String value){
        tabla.put(key, value);
    }
    
    public String toString(){
        String resultado = "";
        for(String s:aVotar){
            resultado += s +":" +tabla.get(s)+ ";";
        }
        return resultado;
    }
   
}